@echo off
set MasterConf=C:\multiViewer\Main-branch-3D-rendering\MultiViewer.Master\bin\Debug\MultiViewer.Master.exe.config
set ClientConf=C:\multiViewer\Main-branch-3D-rendering\MultiViewer.Client\bin\Debug\MultiViewer.Client.exe.config

REM set MasterConf=C:\MultiViewer2\MultiViewer.Master.exe.config.miniwall.noy
REM set ClientConf=C:\multiViewer\Main-branch-glass-Cache-branch-AddtitionalMapsSemi-TransoprencySupport\MultiViewer.Client\bin\Debug\MultiViewer.Client.exe.config

set ClientPath=C:\multiViewer\Main-branch-3D-rendering\MultiViewer.Client\bin\Debug\
set ServerPath=C:\multiViewer\Main-branch-3D-rendering\MultiViewer.Master\bin\Debug\

REM set ClientPath=C:\multiViewer\Main-branch-glass-Cache-branch-AddtitionalMapsSemi-TransoprencySupport\MultiViewer.Client\bin\Debug\
REM set ServerPath=C:\multiViewer\Main-branch-glass-Cache-branch-AddtitionalMapsSemi-TransoprencySupport\MultiViewer.Master\bin\Debug\

set DstFolder=MultiViewer2
set Source=C:\%DstFolder%\
set Dest1=\\wall2\C$\%DstFolder%\
set Dest2=\\wall3\C$\%DstFolder%\

if not exist %Dest1% mkdir %Dest1%
if not exist %Dest2% mkdir %Dest2%

echo Gathering client files...
for %%f in (%ClientPath%*.exe %ClientPath%*.dll %ClientPath%*.xml %ClientPath%*.dds %ClientPath%*.kml %ClientPath%*.jpg %ClientPath%*.bmp %ClientPath%*.fx %ClientPath%*.png %ClientPath%*.config) do copy /y %%f %Source%
echo Done.
echo.

echo Gathering server files...
for %%f in (%ServerPath%*.exe %ServerPath%*.dll %ServerPath%*.xml %ServerPath%*.dds %ServerPath%*.kml %ServerPath%*.jpg %ServerPath%*.bmp %ServerPath%*.fx %ServerPath%*.png %ServerPath%*.config) do copy /y %%f %Source%
echo Done.
echo.

echo Overriding master config...
copy /y %MasterConf% %Source%\MultiViewer.Master.exe.Config
echo Done.

echo Overriding clients config...
copy /y %ClientConf% %Source%\MultiViewer.Client.exe.config
echo Done.

echo Copying files to remote clients
echo.
for %%f in (%Source%*.exe %Source%*.dll %Source%*.xml %Source%*.kml %Source%*.png %Source%*.jpg %Source%*.bmp %Source%*.dds %Source%*.fx %Source%*.config) do echo %%f 
echo.  
echo.

echo To %Dest1%
for %%f in (%Source%*.exe %Source%*.dll %Source%*.xml %Source%*.kml %Source%*.png %Source%*.jpg %Source%*.bmp %Source%*.dds %Source%*.fx %Source%*.config) do copy /y %%f %Dest1%
echo Done.
echo.

echo To %Dest2%
for %%f in (%Source%*.exe %Source%*.dll %Source%*.xml %Source%*.kml %Source%*.png %Source%*.jpg %Source%*.bmp %Source%*.dds %Source%*.fx %Source%*.config) do copy /y %%f %Dest2%
echo Done.
echo.
